/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utils;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 * @author salm
 */
public class RemoteFactory
{
    public static <I extends Remote> I createRemote(I obj, int port) throws RemoteException
    {
        return (I) UnicastRemoteObject.exportObject(obj, port);
    }
}
